1. Field of the Invention
The present invention relates to a power monitoring method and apparatus for monitoring a power status of a printer or other peripheral device, and relates particularly to a power monitoring method and apparatus for a printer or peripheral device having a function for passing status information to a host computer when there is a change in the printer status, including a drop in the printer power supply voltage below a specified threshold level. The present invention also relates to a software program for implementing the power monitoring method and media on which the program is recorded or carried.
2. Description of the Related Art
Data processing terminals such as point-of-sale (POS) and electronic cash register (ECR) terminals are today commonly equipped with a printer that is connected to a host computer and is controlled based on commands and print data received from the host computer. The host computer in such applications typically controls printer operation based on printer status information received from the printer. This status information enables the host to determine the current operating status of the printer, and includes, for example, the printer power supply voltage, the print head position, whether there is paper in the printer, whether the printer cover is open or closed, and whether paper is being advanced.
The printer also generally has its own power supply that is independent of the host computer power supply. The printer starts and stops operating when the user turns the printer power switch on and off, respectively.
Once printer power has been turned on, the host computer typically cannot determine if the user has thereafter turned printer power off. As a result, the host will continue to send print data to a printer even after that printer has been turned off. The turned-off printer cannot receive or process the data and thus the transferred print data will not be printed. The host computer will typically be unaware of this print error.
In addition, when a printer that has been turned off is then turned on again, the on/off operation causes the printer to reset so that it can again receive print data from the host. Printer settings are thus reinitialized. As a result, print data that is sent to the printer after it is turned back on, based on the printer settings before the printer power was turned off, may not be printed with the expected results.
It should be noted that the host computer can be designed to regularly poll the on/off status of the printer, but to effectively eliminate the above-noted problems this monitoring operation must be frequently repeated. This reduces host computer throughput.
It is also possible to design the printer so that the printer sends information notifying the host that printer power has been turned off and then on again. This, however, means adding functionality to the printer, and thus cannot be effectively implemented in existing printers.
On the other hand, if a power monitoring function can be designed whereby the host can determine the power on/off status of the printer with a change in the host computer functionality but without any change in function on the printer side, product design is made easier, and the power monitoring function can be widely deployed even with existing printers.
Therefore, it is an object of the present invention to overcome the aforementioned problems. In the following discussions, reference will be made to a printer for the sake of ease of understanding. However, the present invention is equally applicable to other peripheral devices such as display devices and scanners.
With consideration given to the above-noted problems, it is therefore an object of the present invention to provide a printer power monitoring function and apparatus whereby printer power status can be determined by the host computer, thereby enabling printing to be completed normally even when a printer that is in use is reset by being turned off and then on again.
A further object of the present invention is to enable normal printing with existing printing systems by changing functionality on the host computer side and requiring no change in function of existing printers.
Another object of the invention is to provide a software program for performing the method of the present invention. The software program can be stand-alone, resident on the host computer, recorded on media readable by the host computer or embodied on a carrier wave that can be input to the computer.
To achieve the above objects, a printer power monitoring method according to the present invention is for use in a host computer for monitoring the power supply status of a printer having a capability of sending to the host computer status information resulting from a change in printer status where this status information includes a drop in printer power supply voltage below a specific threshold level. This printer power monitoring method comprises: a step of receiving status information sent from the printer; a step of requesting current status information from the printer after the printer status information has been received; and a step of determining that printer power is off if a response to the current status information request is not received.
When printer power is turned off by the user, the printer supply voltage decreases gradually over a known period of time. This period of time in which the voltage level decays can be determined empirically for any given printer model and will depend on, for example, the capacitance of the printer""s power supply circuits. The rate of voltage decrease will be maximum (and thus the time period to zero voltage will be the shortest) when the printer is in a high-load state, e.g. during printing, and the rate of decrease will be minimum (and thus the time period to zero voltage will be the longest) when the printer is in a low-load state, e.g. standby mode. When the supply voltage drops below a predetermined threshold level, the printer sends a printer status information report indicating a power supply error, for example, to the host, thus informing the host that a non-recoverable error has occurred. When the host receives this report, it sends a current status information request to the printer. If the printer status information was sent to the host computer because the power was turned off, printer power will be completely off when the status information request is received from the host computer, and the printer will not be able to respond to the request. Therefore, if the host does not receive a response, it can determine that printer power is off.
The step of requesting current status information from the printer is preferably performed after a delay period equivalent to at least the time required for printer power to completely turn off (i.e. power supply voltage equaling zero or nearly zero) after the printer power supply voltage drops below a specific threshold level.
The printer power monitoring method of the invention preferably further comprises a step of evaluating received status information content following the step of receiving status information sent from the printer. In this embodiment, the step, of requesting current status information from the printer is performed only when the received status information content relates to a non-recoverable error, including a drop in printer power supply voltage below a specific threshold level.
Alternatively, in the printer power monitoring method of the present invention, the host computer can make a printer power off determination without performing the step of requesting current status information from the printer when the status information bit stream is not received in its entirely in the step of receiving status information sent from the printer. In this situation, it is assumed that the printer""s failure to send complete status information is the result of power being turned off and the voltage level dropping too quickly for the printer to complete its status transmission.
Yet further preferably, the printer power monitoring method according to the present invention additionally comprises a step of monitoring that power is turned back on after the step of determining that printer power is off.
In this embodiment, the step of monitoring that power is turned on comprises: a step of requesting current status information from the printer; and a step of determining that printer power is on if a response to the current status information request is received.
The step of requesting current status information from the printer can alternatively be performed just before the host computer sends data to the printer.
Yet further alternatively, the step of requesting current status information from the printer can be repeated at a specific time interval.
The present invention also includes a power monitoring apparatus disposed in a host computer for monitoring a power supply status in a printer having the capability of sending to the host computer status information resulting from a change in printer status, including a drop in printer power supply voltage below a specific threshold level. This printer power monitoring apparatus comprises: a receiving unit that receives status information sent from the printer; a status information request generator that requests current status information from the printer after the printer status information has been received; and an evaluation unit that determines that printer power is off if a response to the current status information request is not received.
The present invention also includes a printer operating according to control commands and print data from a host computer. This printer comprises: a supply voltage detector that detects a printer power supply voltage; a notification unit that communicates status information to the host computer immediately after a change in printer status occurs; and an execution unit that runs in real time, without storing to a buffer, a specific command from the host computer. The notification unit notifies the host computer when the supply voltage detector detects that the printer power supply voltage is below a specific threshold level, and the execution unit sends status information in response to a real-time command from the host computer requesting printer status information.
The printer normally monitors a drop in the supply voltage and notifies the host computer of a voltage drop even when a status request is not received from the host computer. When the host computer receives such a voltage drop notification, it sends a real-time command to the printer requesting current printer status information, and can determine whether printer power is on or off based on whether a response to the real-time command is received from the printer.
The present invention further includes a software program for implementing the power monitoring control method of the present invention. The software program may be stand-alone, resident on the host computer, recorded on media readable by the host computer or embodied in a carrier wave that can be input to the host computer.
Other objects and attainments together with a fuller understanding of the invention will become apparent and appreciated by referring to the following description and claims taken in conjunction with the accompanying drawings.